package com.ows.powercontrol.Listener;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

/**
 * @author cq
 * @date   10点48分
 */
@Component
public class TestThread implements CommandLineRunner {

    @Value("${server.port}")
    private String port;

    @Override
    public void run(String... args) {
        try {
            Runtime.getRuntime().exec("cmd   /c   start http://localhost:"+port+"/car_index.html");
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

}
